/*
 * Copyright 2007 Stefan Arentz <http://stefan.arentz.nl>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.sateh.paypal;

import java.math.BigDecimal;
import java.util.Currency;
import java.io.Serializable;

public class PayPalItem implements Serializable
{
    private String name;
    private String number;
    private BigDecimal amount;
    private Currency currency;

    public PayPalItem(String name, String number, BigDecimal amount, Currency currency)
    {
        this.name = name;
        this.number = number;
        this.amount = amount;
        this.currency = currency;
    }

    public PayPalItem(String name, String number, BigDecimal amount, String currencyCode)
    {
        this.name = name;
        this.number = number;
        this.amount = amount;
        currency = Currency.getInstance(currencyCode);
    }

    public PayPalItem(String name, String number, String amount, String currencyCode)
    {
        this.name = name;
        this.number = number;
        this.amount = new BigDecimal(amount);
        currency = Currency.getInstance(currencyCode);
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getNumber()
    {
        return number;
    }

    public void setNumber(String number)
    {
        this.number = number;
    }

    public BigDecimal getAmount()
    {
        return amount;
    }

    public void setAmount(BigDecimal amount)
    {
        this.amount = amount;
    }

    public Currency getCurrency()
    {
        return currency;
    }

    public void setCurrency(Currency currency)
    {
        this.currency = currency;
    }
}
